License agreement: ------------------ APPLY.EXE is a shareware program. You can use it to evaluate it but once you decide to keep it you should register your copy by sending 10$ money order ( preferred ) or check with your name and address to: Jean S. LaRochelle 865 Des Jesuites #8 Quebec, PQ, CANADA G1S-3N2 You can give a copy of APPLY to friends for evaluation but you must include this file with the program. In no event shall Jean S. LaRochelle be liable for any damage whatsoever, including but without limitation: damage for loss of business profits, loss of information and other pecuniary losses even if Jean S. LaRochelle has been advised of the possibility of such damage. I have been using APPLY for a few month before it's release on the market and I have found it very useful. Feel free to send any suggestion or remark I will take them into account for future version. Overview of APPLY ----------------- APPLY is a program that makes it possible for you to instantly build elaborate file processing command and to selectively "apply" those command to a group of file. APPLY is made up of two main component: 1) Command line file-name processing macro language. 2) Command list editor The way you use APPLY is by first building a command with the macro language. You can use an optional mask for file selection as the last argument ( *.EXE, *.?AT, etc... ). Pressing enter will take you right into the list editor were you can fine tune your commands by editing them using standard editing functions including search and replace. You can use page up and page down and the cursor key to move around in the editor. Use ALT+S to activate the search and replace command. It is also in the editor that you will do the final selection of file by selectively marking them for processing. Thus the editor gives you more control for file selection than the DOS wildcard characters alone. Once you are satisfied with the result you can apply the command by pressing ALT+R in the editor or you can save the commands to a batch file using the ALT+W commands. You can also cancel file processing by pressing ALT+X. Remember that you have to select file for processing using CTRL+A or ALT+A otherwise pressing ALT+R or ALT+W will give no usefull result. 1) The macro language The general syntax for the macro command is: APPLY [ COMMAND | %A | %F | %P | %N | %X | %Ln | %Rn | %Mn ] [FILESPEC] Where: COMMAND is any dos command or program name %A to %L are special substitution parameters %A will get replaced by full path and file name ( absolute ) %F by file name and extension %P by path %N by file name with no extension %X by extension preceded ( no dot ) %Rn or %Ln by n last or first characters in name ( right, left ) %Mn by the n character in name FILESPEC is a special optional parameter to add filespec for selection Parameters in the first bracket can be repeated and permutated as long as the result is a valid command. For example: APPLY REN %A %L601.OLD *.PAS Will build a list off all *.pas file in the current directory with a command to rename them using at most the first six characters in the name, followed by 01 and the extention .OLD . Sometimes I want to backup a number of files with the same name but different extension. Using APPLY I can do: APPLY REN %A %L5%X.OLD This will rename all selected files using a name built from the name and extension. This approach also preserves the information about the old extension. One of the most usefull application of APPLY is with the dos delete command. Simply type: APPLY DEL You will get a list of the files in the current directory ready to be deleted. I find this more useful that DEL *.*/P because you get a global picture of the directory. When used with one parameter APPLY will assume %A and *.* so that the above command is equivalent to: APPLY DEL %A *.* You can then select files for processing or exclude files using the CTRL+A and ALT+A key. Of course if the files are not in the current directory you can specify a path in the last wildcard argument. APPLY DEL %A A:\*.* Notice that in order to specify a path we had to use explicit arguments. In those situation were you want to apply several command to each file simply seperate each command with ;. For example: APPLY ATTRIB -R %f ; DEL %f *.exe This command will turn off the read only attribute of a file and then delete each selected file. Limitations ----------- Apply will handle a maximum of approximatly 800 files depending on available memory. Apply requires a certain amount of disk space because it builds a batch file to execute the commands. APPLY will try to write the batch file in the current directory and if this fails it will try to build the batch file in the directory where it is located. The batch file ($APPLY$.BAT) is deleted after execution.